package com.tcj.blog.mapper;

import com.tcj.blog.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tcj.blog.dto.LoginUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Tcj
 * @since 2020-09-30
 */
@Mapper
@Repository
public interface UserMapper extends BaseMapper<User> {

    User loginUser(LoginUser loginUser);

    @Select("select count(*) from user where account = #{account}")
    int checkAcc(String account);

    int changeUser(@Param("user") User user);
}
